<?php
namespace  app\index\model;
use think\Model;
use think\Db;

class Admin extends Model{
    /**
     * @param $username
     * @return mixed
     * @throws \think\db\exception\DataNotFoundException
     * @throws \think\db\exception\ModelNotFoundException
     * @throws \think\exception\DbException
     */
    public function getAdminByUsername($username){
        /*where('logid',['in',[lis,5505,4444]],)*/
        $result = Db::table('xt_user')->field('logid,username,password,status')
            ->where(['logid'=>$username])->select();

         foreach($result as $userinfo){
            return $userinfo;
        }
        /*return $userinfo = array('logid'=>'lis','password' =>'....');*/
    }
}